module.exports = function (Sequelize, sequelize) {
    const {STRING, INTEGER, DATE} = Sequelize
    return sequelize.define('remote_ssh', {
        id: {
            type: INTEGER,
            primaryKey: true,
            autoIncrement: true,
            comment: "id",
        },
        name: {
            type: STRING,
            allowNull: true,
            comment: "名称",
        },
        uuid: {
            type: STRING,
            allowNull: true,
            comment: "uuid",
        },
        username: {
            type: STRING,
            allowNull: true,
            comment: "用户名",
        },
        password: {
            type: STRING,
            allowNull: true,
            comment: "密码",
        },
        host: {
            type: STRING,
            allowNull: true,
            comment: "主机地址",
        },
        port: {
            type: INTEGER,
            defaultValue: 0,
            allowNull: true,
            comment: "端口",
        },
        del_flag: {
            type: INTEGER,
            defaultValue: 0,
            allowNull: true,
            comment: "是否删除",
        },
        create_time: {
            type: DATE,
            defaultValue: new Date(),
            allowNull: true,
            comment: "创建时间",
        },
        update_time: {
            type: DATE,
            defaultValue: new Date(),
            allowNull: true,
            comment: "修改时间",
        },

    }, {
        //使用自定义表名
        freezeTableName: true,
        //去掉默认的添加时间和更新时间
        timestamps: false,
    })
}
